﻿using System;
using System.Collections.Generic;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace Presentation.WebApp.Master
{
    public partial class ThinkingCore : System.Web.UI.MasterPage
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            DetectSkin(Page);
        }
        public static void DetectSkin(Page page)
        {

            string skin = "blue";
            HttpRequest request = HttpContext.Current.Request;
            if (request.QueryString["skin"] != null)
            {
                skin = request.QueryString["skin"].ToString();
                string skinFile = string.Format("../../Css/skin/{0}.css", skin);
                string skinTag = String.Format("<link href='{0}' rel='stylesheet' type='text/css'/>", skinFile);
                page.Header.Controls.Add(new LiteralControl(skinTag));
            }

        }
    }
}